/* frame_pic.cpp */

#include <dodo_plot/kernel/frame_pic.h>
#include <dodo_plot/kernel/plotter.h>

namespace dodo_plot
{

void Frame_Pic::draw(const Plotter& plotter) const
{
	plotter.save();
	if(crop_)
	{
		plotter.rectangle(Position(0, width(), 0, height()));
		plotter.clip();
	}
	plotter.begin_new_path();
	content_.draw(plotter.sub_plotter(local_pos(), content_.local_pos()));
	if(crop_)
	{
		plotter.reset_clip();
	}
	plotter.restore();
}


}
